home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 5962 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.9 KB

  1. Path: ix.netcom.com!netnews
  2. From: miker3@ix.netcom.com (Mike Rubenstein)
  3. Newsgroups: comp.lang.c++,comp.lang.c,comp.lang
  4. Subject: Re: Undefined behavior? on type conversion, was: Re: Hungarian notation
  5. Date: Wed, 07 Feb 1996 12:46:25 GMT
  6. Organization: Netcom
  7. Message-ID: <31189e62.47294315@nntp.ix.netcom.com>
  8. References: <30C40F77.53B5@swsbbs.com> <4d2ok0$69s@beach.and.nl> <4er2qo$h2s@galaxy.ucr.edu> <31118641.6802368@nntp.ix.netcom.com> <4eurpq$b75@news.xmission.com> <31137427.133220928@nntp.ix.netcom.com> <4f975g$g18@news.xmission.com>
  9. NNTP-Posting-Host: ix-dc9-20.ix.netcom.com
  10. X-NETCOM-Date: Wed Feb 07  4:46:33 AM PST 1996
  11. X-Newsreader: Forte Agent .99d/32.182
  12.  
  13. NOTE: I have trimmed the Newsgroups
  14.  
  15. tknarr@xmission.com   ( Todd Knarr ) wrote:
  16.  
  17. > In <31137427.133220928@nntp.ix.netcom.com>, miker3@ix.netcom.com (Mike Rubenstein) writes:
  18. > >No, I can't tell that you read the standard conservatively.  You seem
  19. > >to be adding things that just aren't there.  You're saying that
  20. > The thing is, I don't recall anything in the standard where "result"
  21. > precludes side-effects. So, I don't assume there is such a prohibition.
  22. > I may be wrong, but if I am I probably won't break code because of it.
  23. > >The standard does not say that a machine must have the ability to do
  24. > >multiplication either.  That doesn't mean that an implemenation can
  25. > >simply give an exception if you do a multiplication -- it must handle
  26. > >it in software since the standard requires a C implementation be able
  27. > >to do multiplication.
  28. > Except that it does require multiplication to be done, and it does
  29. > leave the results of things like overflow up to the application. Ditto
  30. > the result of / when the second operand is 0.
  31.  
  32. Just as it requires a conversion to be done for (char) 256, even if
  33. char is 8 bits.  Again, the standard says a cast does a conversion and
  34. this is the correct syntax and valid data for the operation.  Hence a
  35. conversion must be done.
  36.  
  37. Michael M Rubenstein
  38.